Seizure detection methods, apparatus, and systems using an autoregression algorithm

ABSTRACT

A method, comprising receiving a time series of patient body signal, determining first and second sliding time windows for the time series; applying an autoregression algorithm, comprising: applying an autoregression analysis to each of the first and second windows, yielding autoregression coefficients and a residual variance for each window; estimating a parameter vector for each window based on the autoregression coefficients and residual variances; and determining a difference between the parameter vectors; and determining seizure onset and seizure termination based on the difference between the parameter vectors. A non-transitory computer readable program storage unit encoded with instructions that, when executed by a computer, perform the method.

BACKGROUND OF THE INVENTION

The present application claims priority to and is a continuationapplication of U.S. Ser. No. 16/706,688, filed on Dec. 7, 2019 entitled“SEIZURE DETECTION METHODS, APPARATUS, AND SYSTEMS USING ANAUTOREGRESSION ALGORITHM”, which claims priority to and is a divisionalapplication of U.S. Ser. No. 13/559,116, filed on Jul. 26, 2012 (nowU.S. Pat. No. 10,537,251), entitled “SEIZURE DETECTION METHODS,APPARATUS, AND SYSTEMS USING A SHORT TERM AVERAGE/LONG TERM AVERAGEALGORITHM”, which claims priority to U.S. provisional patent applicationSer. No. 61/547,567, filed on Oct. 14, 2011, which are all incorporatedin their entireties herein by reference.

1. FIELD OF THE INVENTION

The present invention relates generally to the field of epileptic eventdetection. More particularly, it concerns epileptic event detection byuse of an autoregression algorithm on a time series of patient bodysignal data.

2. DESCRIPTION OF RELATED ART

There have been various advancements in the area of seizure detection,which remains a fairly subjective endeavor. The task of automateddetection of epileptic seizures is generally related to and dependent onthe definition of what is a seizure, definition which to date issubjective and thus inconsistent within and among experts. The lack ofan objective and universal definition complicates not only the task ofvalidation and comparison of detection algorithms, but also (andpossibly more importantly), the characterization of the spatio-temporalbehavior of seizures and of other dynamical features required toformulate a comprehensive epilepsy theory.

The current state of automated seizure detection is, by extension, areflection of the power and limitations of visual analysis, upon whichit rests. The subjectivity intrinsic to expert visual analysis ofseizures and its incompleteness (it cannot adequately quantify orestimate certain signal features, such as power spectrum) confound theobjectivity and reproducibility of results of signal processing toolsused for automated seizure detection. What is more, several of thefactors that enter into the determination of whether or not certaingrapho-elements should be classified as a seizure are non-explicit(“gestalt-based”) and thus difficult to articulate, formalize andprogram into algorithms.

Most, if not all, existing seizure detection algorithms are structuredto operate as expert electroencephalographers. Thus, seizure detectionalgorithms that apply expert-based rules are at once useful anddeficient; useful as they are based on a certain fund of irreplaceableclinical knowledge, and deficient as human analysis biases propagateinto their architecture. These cognitive biases which pervade humandecision processes and which have been the subject of formal inquiry arerooted in common practice behaviors such as: a) The tendency to rely tooheavily on one feature when making decisions (e.g., if onset is notsudden, the event is unlikely to be characterized as a seizure becauseseizures are paroxysmal events); b) To declare objects as equal if theyhave the same external properties (e.g., this is a seizure because it isjust as rhythmical as those we score as seizures) or c) relying on theease with which associations come to mind (e.g., this pattern looks justlike the seizures we reviewed yesterday).

Seizure detection algorithms' mixed results make attainment of a unitaryor universal seizure definition ostensibly difficult. In addition tocognitive biases, the inadequacy of many seizure detection algorithmsmay also be attributable in part, to the distinctiveness in thearchitecture and parameters of each algorithm. The fractal ormulti-fractal structures of seizures accounts at least in part for thedifferences in results, and draws attention to the so-called “Richardsoneffect.” Richardson demonstrated that the length of borders betweencountries (a natural fractal) is a function of the size of themeasurement tool, increasing without limit as the tool's size isreduced. Mandelbrot, in his seminal contribution “How long is the coastof Britain,” stressed the complexities inherent to the Richardsoneffect, due to the dependency of particular measurements on the scale ofthe tool used to perform them. Although defining seizures as a functionof a detection tool would be acceptable, this approach may beimpracticable when comparisons between, for example, clinical trials oralgorithms are warranted. Another strategy to bring unification ofdefinitions is to universally adopt the use of one method, but thiswould be to the detriment of knowledge mining from seizure-time seriesand by extension to clinical epileptology.

To date, meaningful performance comparisons among myriad existingalgorithms have not been feasible due to lack of a common and adequatedatabase. However, even if adequate databases were available, the valueof such “comparisons” would be limited by the absence of a universallyaccepted definition of what is a “seizure.” The previously notedcognitive biases and architectural/parametric distinctions amongalgorithms impede achievement of consensus and in certain cases even ofmajority agreement in classifying particular events as seizures ornon-seizures. Because expert visual analysis provides the benchmarks(seizure onset and termination times) from which key metrics (detectionlatency in reference to electrographic and clinical onset time (“speedof detection”), sensitivity, specificity and positive predictive value)are derived, the effects of cognitive biases propagate beyond theseizure/non-seizure question into other aspects of the effectiveness ofa particular seizure detection algorithm.

SUMMARY OF THE INVENTION

In one embodiment, the present disclosure provides a method, comprising:receiving a time series of a first body signal of a patient, determininga first sliding time window and a second sliding time window for saidtime series of said first body signal;

-   -   applying an autoregression algorithm, comprising: applying an        autoregression analysis to each of said first and second windows        to yield a plurality of autoregression coefficients for each        said window and a residual variance for each said window;        estimating a parameter vector for each of said first and second        windows, based at least in part on said autoregression        coefficients and said residual variances; and determining a        difference between said parameter vectors for said first and        second windows using a matrix function;    -   determining an onset of a seizure based on said difference        between said parameter vectors, wherein said difference        indicates a larger variance in said second window than in said        first window; and    -   determining a termination of a seizure based on said difference        between said parameter vectors, wherein said difference        indicates a larger variance in said first window than in said        second window.

In one embodiment, the present disclosure provides a non-transitorycomputer readable program storage unit encoded with instructions that,when executed by a computer, perform a method as described above andherein.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may be understood by reference to the followingdescription taken in conjunction with the accompanying drawings, inwhich like reference numerals identify like elements, and in which:

FIG. 1 illustrates a medical device system for detecting and classifyingseizure events related to epilepsy from sensed body data processed toextract features indicative of aspects of the patient's epilepsycondition;

FIG. 2 illustrates a medical device system, according to an illustrativeembodiment of the present disclosure;

FIG. 3 provides a stylized diagram of a medical device and differentdata acquisition units that may provide output(s) used by other unit(s)of the medical device, in accordance with one illustrative embodiment ofthe present disclosure;

FIG. 4 provides a stylized diagram of a medical device and differentdata acquisition units that may provide output(s) used by other unit(s)of the medical device, in accordance with one illustrative embodiment ofthe present disclosure;

FIG. 5 provides a stylized diagram of a seizure onset/termination unit,in accordance with one illustrative embodiment of the presentdisclosure;

FIG. 6 illustrates the output of the r² algorithm in reference to anAverage Indicator Function (AIF) making use of the output fouralgorithms, including the r² algorithm, in accordance with oneillustrative embodiment of the present disclosure;

FIG. 7 shows a graph of a specificity function for the r² method as afunction of time with respect to a validated algorithm's time of seizuredetection, in accordance with one illustrative embodiment of the presentinvention;

FIG. 8 shows a plot of the decimal logarithm of the dependence ofseizure energy on seizure duration, in accordance with one illustrativeembodiment of the present disclosure;

FIG. 9 shows the empirical “tail” of the conditional probabilitydistribution functions for: (a) Seizure durations (minimum duration: 2sec); and (b) the logarithm of seizure energy as estimated with fourdifferent methods, in accordance with one illustrative embodiment of thepresent disclosure;

FIG. 10 provides a flowchart depiction of a method, in accordance withone illustrative embodiment of the present disclosure;

FIG. 11 shows ECoG before (upper panel) and after differentiation (lowerpanel), in accordance with one illustrative embodiment of the presentdisclosure; and

FIG. 12 shows temporal evolution of the decimal logarithm of the powerspectrum of differentiated ECoG.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

In one aspect, the present disclosure provides several new seizuredetection algorithms that may be applied to one or more streams of bodydata. Some of these algorithms rely principally on power variance fordetection of seizures, while others rely mainly on power spectral shape.

In another aspect, the present disclosure exploits the simultaneousapplication of two or more individual seizure detection algorithms toderive a probabilistic measure of seizure activity (PMSA), which may beused to issue detections by majority or consensus of a plurality of thetwo or more seizure detection algorithms, depending on safety factorsand others such as detection speed, sensitivity, specificity or anyother performance measures and the clinical application(s) at hand.Real-time (“on the run”) automated seizure detection provides the onlymeans through which contingent warning to minimize risk of injury topatients, delivery of a therapy for control of seizures, or logging ofthe date, time of onset and termination and severity may be performed.

This disclosure, in one embodiment, provides an autoregression algorithmsuitable for use in epileptic event detection, by operation on a timeseries of patient body signal data. Such an autoregression algorithm maybe used by itself, or as part of a Probabilistic Measure of SeizureActivity.

More generally, this disclosure: a) draws attention to the complexitiesinherent to the pursuit of a universal seizure definition even whenpowerful, well understood signal analysis methods are utilized; b)identifies this aim as a multi-objective optimization problem anddiscusses the advantages and disadvantages of adopting or rejecting aunitary seizure definition; c) introduces a Probabilistic Measure ofSeizure Activity to manage this thorny issue.

Seizure detection belongs to a class of optimization problems known as“multi-objective” due to the competing nature between objectives:improvements in specificity of detection invariably degrade sensitivity,and vice-versa. Attempts to achieve a universal seizure definition usingobjective, quantitative means are likely to be fraught with similarcompeting objectives. In one aspect, the present invention involves theapplication of tools from the field of multi-objective optimization,among others to make the problems caused by competing objectives moretractable.

Achieving a unitary seizure definition would be difficult, as consensusamong epileptologists as to what grapho-elements are classifiable asictal, is rare. In the absence of a universal definition, issuingseizure warnings for certain cases will be problematic and unsafe. Forexample, if a patient with seizures wishes to operate power equipment ora motor vehicle, the absence of a universal agreement on when thepatient has had a seizure may preclude any viable way of ensuring, usingseizure detection algorithms, that the patient's seizures are undersufficient control to allow such activities to occur. To manage thedifficulties of a consensus seizure definition, substantive gains arefeasible through steps entailing, for example, the application ofadvanced signal analysis tools to ECoG, to hasten the identification ofproperties/features that would lead to the probabilistic discriminationof seizures from non-seizures with worthwhile sensitivity andspecificity for the task at hand. However, to even have a modicum ofsuccess, such an approach should not ignore the non-stationarity ofseizures and, should strike some sort of balance between supervised(human) and unsupervised machine-learning) approaches. The resultingmultidimensional parameter space, expected to be broad and intricate,may also foster discovery of hypothesized (e.g. pre-ictal) brainsub-states.

The challenges posed by the attempt to define seizures unitarily usingobjective means (distinct from visual analysis) may be partly related totheir fractal properties and understood through a simplistic analogy tothe so-called “Richardson effect”. A revision of the time-honoredsubjective definition of seizures may be warranted to further advanceepileptology.

In one aspect, the present disclosure provides a Probabilistic Measureof Seizure Activity (PMSA) as one possible strategy for characterizationof the multi-fractal, non-stationary structure of seizures, in anattempt to overcome the more substantive limitations intrinsic to otherseizure detection methods, including those involving scalp or evendirect brain recordings of electrical activity.

The PMSA may make use of “indicator functions” (IF s) denoted χ_(algo)for each algorithm. In one embodiment, the PMSA may also make use of anAverage Indicator Function (AIF). In one embodiment, the AIF is definedas:

AIF(t)=(χ_(Val)(t)+χ_(r) ₂ (t)+χ_(STA/LTA)(t)+χ_(WTMM)(t))/4

The subscripts Val, r², STA/LTA and WTMM refer to four different seizuredetection algorithms, particular embodiments of which are describedherein and/or in other related applications. One or more of thesealgorithms may be used to detected seizures from one or more body datastreams including, but not limited to, a brain activity (e.g., EEG) datastream, a cardiac (e.g., a heart beat) data stream, and a kinetic (e.g.,body movement as measured by an accelerometer) data stream. “Val” refersto an algorithm for seizure detection using ECoG data that has beenvalidated by experts without reaching a universal consensus about itsperformance (e.g., false positive, false negative and true positivedetections). An “r²” algorithm may also be referred to herein as an“r{circumflex over ( )}²,” “autoregression,” or “autoregressive”algorithm. A STA/LTA algorithm refers to an algorithm characterized bythe ratio of a Short-Term Average to a Long-Term Average. A WTMMalgorithm refers to a Wavelet Transform Maximum Modulus algorithm.

For determination of an AIF from the foregoing formula, an algorithm'sIF (i.e., output values for each of χ_(val), χ_(r) ₂ χ_(STA/LTA), andχ_(WTMM)) equals 1 for time intervals (0.5 sec in this application)“populated” by ictal activity and 0 for time intervals populated byinter-ictal activity. The IF's are used to generate four stepwise timefunctions, one for each of: a) a 2^(nd) order auto-regressive model(r²); b) the Wavelet Transform Maximum Modulus (WTMM) model; and c) theratio of short-to-long term averages (STA/LTA) and d) a Validatedalgorithm (Val). From the indicator functions determined for theindividual algorithms, the average indicator function (AIF is computed.In one embodiment, the AIF may range between [0-1], with intermediatevalues of 0.25, 0.5 and 0.75. Intermediate AIF values may be a functionof the number of algorithms applied to the signal. Where, for example, 4algorithms are used and the range of the indicator function is [0-1],the intermediate values are [0.25, 05, 0.75]). These values [0-1] areestimates of the probability of seizure occurrence at any given time. Inanother embodiment, the values of each algorithm's IF may be weighteddifferently, and a composite IF (e.g., a Weighted Indicator Function orWIF) different from the AIF may be computed.

Data obtained from a subject undergoing evaluation for epilepsy surgerywith intracranial electrodes was selected for analysis. The ECoG wasrecorded using electrodes implanted into the amygdala, pes hippocampusand body of hippocampus bilaterally through the temporal neocortex andhad a duration of 6.9 days (142,923,853 samples; 239.75 Hz samplingrate).

For efficient analyses, ECoG signal differentiation was performed, so asto minimize the non-stationarity present in them. If z(t) is raw ECoG,then its difference is X(t)=Z(t)−Z(t−1), where (t) corresponds to asample time increment. This linear operation is exactly invertible and,unlike band-pass filtering or detrending, does not suppress lowfrequency fluctuations, but decreases their overall influence. FIG. 11illustrates the effect of this operation on raw ECoG and FIG. 12 , atime-frequency map of the evolution of the power spectra ofdifferentiated ECoG segments. The power spectra are estimated within 5sec moving windows of length.

Seizure Detection with the “r²-Method”

Consider the autoregressive model of the p-th order for the signalincrements:

$\begin{matrix}{{{{X(t)} + {\sum\limits_{k = 1}^{p}{a_{k} \cdot {X\left( {t - k} \right)}}}} = {d + {\varepsilon(t)}}},{{M\left\lbrack {\varepsilon(t)} \right\rbrack} = 0},{{M\left\lbrack {\varepsilon^{2}(t)} \right\rbrack} = \sigma^{2}}} & (1)\end{matrix}$

where M[.] is the symbol for a mathematical expectation. The model (1)can be re written in a more compact form:

X(t)=c ^(T) Y(t)+ε(t),Y(t)=(−X(t−1), . . . ,−X(t−p),1)^(T) ,c=(a ₁ , . .. ,a _(p) ,d)^(T)  (2)

where c^(T)Y(t) is a scalar product of column-vectors with c^(T) beingthe transposed vector of c. Thus, in the AR-model, each sample ispresented as a weighted sum of p previous values with weights given bythe AR-coefficients, plus some shift d and the residual ε(t), which isregarded as noise with zero mean value and variance σ². The full vectorof parameters of the AR-model is θ=(c^(T), σ)^(T).

A vector θ is estimated for each of the two moving time half-windows ofequal length L to the left (background) and right (foreground) of thewindow's center τ. Let θ⁽¹⁾ be the left half-window parameter vector andθ⁽²⁾ the right half-window parameter vector, and Δθ=θ⁽²⁾−θ⁽¹⁾ theirdifference. Their difference is weighed using Fisher's matrix for themodel (1) defined by:

$\begin{matrix}{{B = {- \frac{\partial^{2}{\ln(\Phi)}}{{\partial\theta}{\partial\theta}}}},{{\ln(\Phi)} = {{{- \left( {L - p} \right)}{\ln(\sigma)}} - {\frac{1}{2\sigma^{2}}{\sum\limits_{t}\left( {{X(t)} - {c^{T}{Y(t)}}} \right)^{2}}}}}} & (3)\end{matrix}$

Expression (3) defines B as the matrix constructed from the second-orderderivatives of the logarithm of the likelihood function Φ under theassumption that ε(t) is Gaussian white noise. Let B⁽¹⁾ and B⁽²⁾ be thematrices (3) computed in the left and right halves of the moving timewindow and let us introduce, in one embodiment, a measure ofnon-stationarity:

r ²(τ)=(Δθ^(T) B ⁽¹⁾Δθ+Δθ^(T) B ⁽²⁾Δθ)/(2(L−p))  (4)

This measure (r²) provides a natural dimensionless estimate of thenon-stationary behavior of the signal X(t). To make the calculationexplicit, this equation (4) is estimated by using the followingexpression:

$\begin{matrix}{{\Delta\theta^{T}B\Delta\theta} = {\frac{2\left( {\Delta\sigma} \right)^{2}}{\sigma^{2}} + \frac{\Delta{c^{T}\left( {\sum\limits_{t}{{Y(t)}{Y^{T}(t)}}} \right)}\Delta c}{\sigma^{2}\left( {L - p} \right)} + \frac{4\Delta c^{T}\Delta\sigma{\sum\limits_{t}{{\varepsilon(t)}{Y(t)}}}}{\sigma^{3}\left( {L - p} \right)}}} & (5)\end{matrix}$

The non-stationarity measures (4)-(5) will be used to identify the onsetand termination of seizures based on the condition that a local maximumof r² exceeds a given threshold R. Specifically, if

$\begin{matrix}{{{r^{2}(\tau)} = {\max\limits_{\xi}\left\{ {{r^{2}(\xi)},{{\tau - {L/4}} \leq \xi \leq {\tau + {L/4}}}} \right\}}},{{r^{2}(\tau)} \geq R},} & (6)\end{matrix}$ then, thetime_(τ)is

1. the onset of a seizure if σ₂>σ₆ (the variance of the residuals of theAR process is larger in the right half of the window (foreground) thanin the left half (background);

2. the termination of a seizure if σ₁>σ₂ (the variance of the residualsof the AR process is smaller in the right half of the window than in theleft half).

Condition (6) reflects the large non-stationarity present in the signalassociated with the onset or termination of seizures as determined bythe jumps from low to high variance (seizure onset) or vice-versa(seizure termination) at time τ.

The values of the residual variances σ₁ and σ₂ are the parameters of the“r² Method” as well as components of the vector C, which is why they areconsolidated into a general vector of parameters θ=(C^(T),σ)^(T). Themethod is based on comparing vectors θ₁ (left half-window) and θ₂(right-half window) using Fisher's matrix as a “natural” statisticalmetric. It is worth pointing out, that the AR(2) method is not sensitiveto changes of variance in power, but to changes in the shape of thespectral density; this is because a short time window estimate Ŝ_(XX)(ω) of the spectral density is directly connected with the vector ofparameters θ by the equation Ŝ_(XX)(ω)=σ²/2π·|1+a₁e^(−iω)+a₂e^(−2iw)|²),where ω is a frequency and i is the imaginary unit. This connectionmakes this method sensitive to changes in the auto-covariance functionR_(XX)(k)=M{X(t)X (t−k)} as follows from the Wiener-Khinchin theorem:

${{S_{XX}(\omega)} = {\sum\limits_{k = {- \infty}}^{+ \infty}{{R_{XX}(k)} \cdot e^{{- {ik}}\omega}}}},{{{where}{R_{XX}(k)}} = {\int\limits_{- \pi}^{\pi}{{{S_{XX}(\omega)} \cdot e^{{ik}\omega}}d{\omega.}}}}$

The AR, and validated algorithms have been described in U.S. provisionalpatent application Ser. No. 61/547,567, filed on Oct. 14, 2011, which ishereby incorporated by reference herein in its entirety.

The total number of detections, their duration and the percent timespent in seizure over the time series total duration (6.9 days) arepresented in Table 1.

TABLE 1 Summary statistics obtained by applying two different detectionmethods (Validated Algorithm; r²). The minimum duration of seizures wasset at 2 s. Validated algorithm r² Total number of seizures withduration ≥2 s. 3184 7029 Mean duration, s. 3.8 23 Median duration, s.3.4 7 % time spent in seizure 2 27

FIG. 6 illustrates the output of the r² algorithm in comparison with anaverage indicator function (AIF) making use of each of the validatedalgorithm, and the r² (AR), STA/LTA and WTMM algorithms. Specifically,FIG. 6 shows results of applying the r² seizure detection method to adifferentiated ECoG (in black; 200 sec/panel) of a human withpharmaco-resistant epilepsy. The grey boxes represent the values (righty-axis) of an Average Indicator Function in the interval [0,1]. Seizureonset and end times are indicated by vertical lines (red for onset, bluefor termination). Notice that the value of the Average IndicatorFunction is rarely 1 at either of the seizure onset or termination,indicating that all methods do not detect the ECoG activity as beingictal in nature at those moments. However, with seizures exceedingcertain duration (at least 20 seconds) and intensity thresholds, theyconverge to all detect the seizure event. This indicates that thespectral and other properties of seizures are not homogeneous at theonset and termination of seizures, which is consistent with the lack ofagreement among human experts (and algorithms) during onset andtermination. Lefty-axis: ECoG amplitude (in μV); excursions above zerocorrespond to positive, and below, to negative, polarity.

Table 2 provides further evidence that, at some point in time, themajority of seizures are detected by the validated algorithm are alsodetected by the other three methods, with WTTM detecting the largestnumber (97%) and STA/LTA the second largest (91.5%) number of seizures.More specifically and by way of example, the value 0.971 in Table 2means that the WTMM method detections encompass 97.1% of seizure timeintervals detected with the validated method, with the exception of 1.6s. that correspond to the delay/lag between them in detecting seizureonsets (see below for details).

Time intervals for which the pairwise product χ_(val) (t)·χ_(r) ₂ (t)=1correspond to seizures detected by both the validated algorithm and ther² algorithm. Dividing the number of time intervals when χ_(val)(t)·χ_(r) ₂ (t)=1 by the number of intervals when χ_(val) (t)=1, yieldsthe specificity of the r² method with respect to the validatedalgorithm. Since the validated algorithm has an inherent delay of 1 sand an additional duration constraint of 0.84 s. is imposed before adetection is issued, its onset and termination times are “delayed”compared to those yielded by the r² algorithm. To account for this delayand make comparisons more meaningful, the specificity of the r² withrespect to the validated algorithm is re-calculated as a function of atime shift τ:

$\begin{matrix}{{{Spe}_{r^{2}{\_{Val}}}(\tau)} = {\sum\limits_{i}{\left( {{\chi_{r^{2}}\left( {t + \tau} \right)} \cdot {\chi_{Val}(t)}} \right)/{\sum\limits_{i}{\chi_{Val}(t)}}}}} & (25)\end{matrix}$

The present inventors discovered that the time differences are negativefor all three algorithms compared to the validated algorithm; that is,the validated algorithm's detection times lag behind those given by theother algorithms. More particularly, the mean delay of the validatedalgorithm is 1.1 s with respect to r²,

The re-calculated specificity values shifted by τ shown in Table 2 arehigher compared to those without shifting.

Method Spe_(Method)_Val (0)$\max\limits_{\tau}{{Spe}_{Method\_ Val}(\tau)}$$\underset{\tau}{\arg\max}{{Spe}_{Method\_ Val}(\tau)}$ r² 0.628 0.882-1.1 s

Table 2. Values of specificity of the r², calculated with respect to thevalidated method, and time lag (as defined in the text) at which thespecificity attains its largest value.

The information in Table 2 is also depicted graphically in FIG. 7 ,which illustrates a graph of a specificity function for the r² method asa function of time with respect to the validated algorithm's time ofseizure detection. Tau (τ) zero (x-axis) corresponds to the time atwhich the validated algorithm issues a detection. Negative τ valuesindicate “late” detections by the validated algorithm in relation to ther² algorithm and positive values the opposite. As shown, r² algorithmissues earlier detections than the validated algorithm. Values of thelags (τ) corresponding to the maximum and minimum values of the functionare presented under the names argmax and argmin respectively.

The present inventors also discovered that only 45.3% of seizuresrecognized as such by the r² algorithm were also detected by thevalidated method, indicating that in its generic form and by design, thevalidated algorithm is less sensitive and more specific for seizuredetection than the r{circumflex over ( )}2 algorithm.

The r² method, along with the other methods mentioned supra, surveydifferent but inter dependent ECoG signal properties, thus expanding thebreadth and perhaps also the depth of insight into the spectral“structure” of epileptic seizures in a clinically relevant manner. TheAuto-Regressive model (r²), which is implementable in a real-timeembodiment, is sensitive mainly to changes in spectral shape, is themost general method of the algorithms previously mentioned (e.g., WTMM,STA/LTA) for providing a statistical description of oscillations (ECoG)that may be regarded as generated by the stochastic analogue of a linearoscillator.

Algorithmic and visual expert analysis consensus as to whatgrapho-elements define a seizure event seems to be highly dependent onwhen during the course of the event a detection decision is made. Inthis context, it is noteworthy that AIF frequently reached a value of 1,indicative of concordance among all detection methods, sometime afterseizure onset and before its termination (as determined by any of themethods), provided the seizures reached a certain duration (20-30s.) asdiscussed in more detail in U.S. provisional patent application Ser. No.61/547,567, filed on Oct. 14, 2011. In short, seizure onsets andterminations may be under certain conditions universally undefinable byalgorithmic or expert visual analysis. A systematic investigation of thedifferences in signal spectral properties between the“preface”/“epilogue” and the “main body” of seizures was not performed.It is speculated that the presence of “start-up transients” (in adynamical sense) and of temporo-spatial dispersion of the ictal signal(which impacts S/N) may be most prominent at the onset and terminationof seizures. These and local and global state-dependencies of certainsignal features, account in part for the temporal fluctuations inalgorithm detection performance.

Defining seizure energy as the product of the standard deviation of thepower of ECoG by its duration (in seconds), reveals that the r²algorithm identifies as a continuum seizures that the validatedalgorithm detects as clusters of short seizures. The lack ofcorrespondence between a certain percentage of detections (11.8% for ther² method) and the validated algorithm may be partially attributed tobrief discontinuities in seizure activity as shown in FIG. 6 . Thisphenomenon (“go-stop-go”) appears to be inherent to seizures (e.g., itis a general feature of intermittency associated with many dynamicalsystems). These discontinuities are also an “artifact” caused by thearchitecture of and parameters used in each algorithm. For example, thelonger the foreground window and the higher the order statistical filter(e.g., median vs. quartile), in the validated algorithm, the higher theprobability that “gaps” in seizure activity will occur. Clustering ofdetections one a strategy to manage dynamical or artifactual ictal“fragmentation,” and in this sense the r² algorithm avoids thesubjective biases and arbitrariness associated with human-imposedclustering rules.

The dependencies of seizure energy (defined as the product of thestandard deviation of the differentiated ECoG signal and seizureduration, in sec.) on seizure duration, for the set of icti detected bythe r² method is depicted in FIG. 8 . A subset of seizures detected byall methods obeys a simple law of proportionality between energy(y-axis) and duration (x-axis, log scale, seconds), that is, the longerthe seizure, the larger its energy. However, this relationship is notinvariably linear for other detection algorithms, indicating thepresence of interesting scaling properties of seizure energy.

FIG. 9 shows the empirical “tail” of the conditional probabilitydistribution functions for: (a) Seizure durations (minimum duration: 2sec); (b) the logarithm of seizure energy as estimated with theValidated method (solid) and the r² (Auto-regressive) method (dashed).

The conditional probabilities of durations (FIG. 9 a ) and of thelogarithm of energy of seizures (FIG. 9 b ) provide additional supportfor the proposition that seizure properties are partly a function of themethod used for their detection. The validated algorithm yields adifferent duration from the r² method. The distributions of thelogarithm of seizure energies as identified by each of the methods (FIG.9 b ) reveals additional discrepancies as evidenced by the much narrowerand shorter “tail” distribution of the validated algorithm compared tothe others.

The medical and psycho-socio-economic burden imposed upon patients,caregivers and health systems by pharmaco-resistant epilepsies isenormous. Intracranial devices for automated detection, warning anddelivery of therapy, is a presently preferred “line of attack.” However,reliance on extra-cerebral signals that are under cortical modulation orcontrol (such as cardiac or motor activity) and are altered by seizures,emerges as a viable research direction with potentially fruitfulclinical applications.

The greater ease of implementation and lower cost of automated real-timedetection, warning and therapy systems based on extra-cerebral signals,compared to those requiring intracranial placement, makes them worthy ofinvestigation.

Cortical electrical activity has been the primary, if not sole source ofsignals for visual or automated detection and quantification of seizuresin clinical use. The inextricable link between brain and epilepsy hashistorically impelled clinical neuroscientists to leave unexploited theequally inextricable link between brain and body. The brain-epilepsylink has distracted attention from certain limitations inherent to therecording of cortical signals from scalp or even directly from itssurface. These limitations of brain-based approaches to seizuredetection include marked cortical signal attenuation and filtering, andlimited access to neural sources (only about one-third of the neocortexis surveyable by scalp electrodes; subdural electrodes record littleactivity from the lateral and bottom walls of sulci). Yet, readilyaccessible sources that provide indirect but valuable information aboutthe state of the brain, particularly during the ictal or postictalstate, remain largely untapped.

The growing emphasis on widely accessible, cost-effective, good qualityhealth care in the context of expanding populations, especially inage-groups above 60 yr. in whom the incidence of epilepsy is high, andthe shrinking financial resources to support the required infrastructure, pose an enormous challenge to patients whose seizures arepharmaco-resistant as well as to epileptologists and functionalneurosurgeons. The emphasis on implantable intracranial devices forautomated seizure detection, warning and delivery of therapy in patientswith drug-resistant seizures should be viewed in the context that evenif economic resources were unlimited, human resources are starkly small.Given the number of functional neurosurgeons in the United States (onesource puts the number at 300, of which about 100 work in epilepsy) isit realistic to pursue exclusively intracranial devices to address theunmet needs of pharmaco-resistant patients, conservatively estimated (inthe US) at 600,000? The deleterious medical, and psycho-social impact ofintractable epilepsy and its high cost of care, along with thesophisticated human and technological resources needed to address them,qualifies this, in these authors opinions, as a public health careproblem. Indeed, scientific advances regardless of their value may nottranslate into improved care of epilepsy and lessen its burden, unlessdevices are broadly accessible; in short the challenge of amelioratingthe global burden of drug-resistant epilepsies may exceed scientific andtechnological ones. If the answer to the question put forth a few linesabove is in the negative (intracranial devices will not meet the globalburden) viable alternatives must be sought.

The utilization of certain extra-cerebral signals looms as one suchalternative. Cardiac (e.g., heart rate, EKG morphology) and motor(speed, direction and force of joint movements) signals are primecandidates for the following reasons: 1. Structures that form part ofthe central autonomic nervous system or are strongly interconnected withit, are common sites of epileptogenesis (e.g., amygdalae-hippocampi); 2.Spread of seizures out of the primary epileptogenic zone, is prevalentin pharmaco-resistant patients so that even if the site of origin is notpart of the central autonomic network, invasion of it by ictal activityis quite common; 3. Partial seizures particularly if complex, arecharacterized by either positive (e.g., motor automatisms, hypermotoricbehavior, clonic/myoclonic activity, focal increase in anti-gravitatorymuscle tone) or negative (e.g., motionless, focal loss ofantigravitatory muscle tone) phenomena that are stereotypical acrossseizures originating from the same site and appear relatively early inthe course of seizures; 4. Cardiac and motor signals are highly robust,easily recordable as they do not require implantable devices ordevelopment of ground breaking technology; EKG, actigraphs, 3-Daccelerometers are widely available commercially and are considerablyless costly than those required for use in the central nervous system(CNS); 5. Signals of cardiac and motor origin lack the high complexityor large dimensionality of those generated by the brain's cortex, aresimpler to process and analyze, and are thus less computationallyexpensive. Ease of computation allows the use of simpler, smallerdevices compared to those required for computation of cortical signalsand as they use less power, battery recharging or replacements are lessfrequent; 6. The neurosurgical procedures and potential associatedcomplications make implantable devices unappealing to a majority ofpharmaco-resistant patients that responded to a survey.

Among the numerous extra-cerebral signals usable for seizure detection,cardiac, have been the most extensively investigated. Tachycardia is acommon manifestation of partial seizures, occurring in almost 90% ofseizures of mesial temporal origin and precedes electrographic (asdetermined with scalp electrodes) and clinical onset in the majority ofthese seizures. (Tachycardia invariably occurs in primarily/secondarilygeneralized tonic-clonic seizures being higher in magnitude and longerduration than in partial seizures. Tachycardia with tonic-clonicseizures is multifactorial: neurogenic, metabolic, and exertional.) Froma cardiac rhythm perspective, the increases in heart rate temporallycorrelated with seizures are rarely pathologic, being of sinus origin;additionally their magnitude is unlikely to compromise cardiac output inhealthy individuals. Ictal tachycardia has a strong neurogenic componentreflective of either an increase in sympathetic or withdrawal ofparasympathetic activity; while increases in motor activity in referenceto the interictal state would augment its magnitude, tachycardia occursin subjects in whom seizures manifest with motionless. Bradycardia alsooccurs with seizures, albeit with much lower prevalence thantachycardia; so called “temporal lobe syncope”, denoting the loss ofconsciousness (without convulsive activity) during partial seizures iscaused by profound bradycardia.

In light of the potential to apply cardiac signals, and in particular ofexploiting changes in heart rate (increases or decreases relative to aninterictal baseline) for automated seizure detection, algorithms arebeing developed and tested to this end. In addition to detection andwarning of seizures, heart rate changes may be used to quantify: a)Relative duration defined as the time said changes spend above or belowan interictal reference value(s); b) Relative intensity corresponding tothe area under the curve or to the product of peak/bottom heart rate andduration (in sec.); c) Seizure frequency/unit time (e.g., month). Thechallenge of this detection modality for ambulatory clinicalapplications, is the ubiquitousness of heart rate changes with dailylife activities that may translate into large numbers of false positivedetections. Arousal from sleep, standing up from a recumbent position,climbing stairs, are but a few of the myriad daily life activitiesassociated with relative or absolute changes (e.g., increases) in heartrate. The discriminating power or positive predictive value (ictal vs.exertional) of this detection modality is currently the subject ofinvestigation in epilepsy monitoring units. Heart rate, among other(rate of change/slope; P-QRS-T morphology) markers, during seizures, arerecorded, analyzed and compared to those associated with protocolizedmotor activities (e.g., walking on a treadmill). Preliminary resultsshow that the magnitude of ictal increases in heart rate is sufficientlylarge compared to non-strenous exercises, so as to allow accuratedifferentiation and, consequently, detection of certain types of partialseizures. It would be naïve and incorrect to presume that univariate(e.g., heart rate changes alone) automated detection of seizures wouldyield worthwhile positive predictive power (PPV=number of true positivedetections/total number of detections) in ambulatory patients.Multivariate-based detection would be required to achieve satisfactoryperformance in a sufficiently large number of patients; ictal(reversible) changes in EKG morphology while less prevalent than inheart rate, have higher specificity and may increase considerably speedof detection (e.g., to within 3 heart beats). Visual analysis ofperi-ictal R-R plots, has led to the discovery of heart rate patternswith characteristic morphology that are reproducible among seizuressharing a common epileptogenic zone and appear to be a specific ictalmarker. One of these patterns resembles the letter “M” and indicatesheart rate changes during seizures may not be unidirectional ormonotonic: in this example, heart rate elevation is followed by a returntowards its interictal baseline, which in turn gives way to a secondelevation in rate. These fluctuations may be attributable, in part tothe co-existence of parasympathetic and cholinergic neurons within thesame autonomic nervous system structure; specifically, components of thecentral autonomic network such as the Dorsal Medial Hypothalamus, theParaventricular Nucleus of the hypothalamus and the Nucleus TractusSolitarius have dual cholinergic and noradrenergic innervation. Heartrate changes are also expected to be dependent on time of day(circadian), level of consciousness (awake vs. asleep), patient'sfitness level, activity level (walking vs. jogging), and emotional andcognitive states, as well as on ingestion of drugs with adrenergic orcholinergic actions.

Ictal motor activity (movement amplitude, direction, velocity and typeand number of muscles groups involved) recorded with actigraphs/3-Daccelerometers would enhance specificity of cardiac-based detection, asit is stereotypical across seizures originating from the samestructure(s). Use of ictal motor movements to detect seizuresindependent of heart rate or other sensors is actively underinvestigation. For example, a wrist accelerometer accurately detectedseven of eight tonic-clonic seizures, and nonseizure movements werereadily identified by patients thereby reducing the consequence of falsedetections. As wearable technologies advance, so do opportunities formore precise measurement of complicated seizure-related movements suchas automatisms.

Respiratory rate is markedly increased (also a neurogenic phenomenon)during seizures manifesting with tachycardia, and its specificity may behigher than heart rate changes as its magnitude and pattern differ amplyfrom exertional increases in ventilation. Electrodermal (e.g. skinresistance, sudomotor) or vocal (e.g., non-formed vocalizations)activity, eyelid and ocular movements (gaze deviation, nystagmus),metabolic (e.g., profound normokalemic lactic acidosis with convulsions,hormonal (prolactin elevations with convulsion or certain partialseizures) or tissue stress (lactic acid, CK) indices may aid inextracerebral seizure detection.

Paradoxically, a potentially important hurdle in the path to adoption ofextra-cerebral detection of seizures is the markedly low sensitivity andother limitations of patient diaries, the universal “gold” metric or“ground truth” in epileptology. The rate of automated seizure detection,whether cerebrally or extra-cerebrally based, will be higher, possiblymuch higher in certain cases, than obtainable with diaries as not onlyclinical, but also “subclinical” seizures will be logged. This“limitation” or “inconvenience” that may discourage patients andepileptologists, is compounded by the absence of simultaneously recordedcortical activity, since direct proof cannot be furnished that a changein extra-cerebral indices, was indeed caused by a seizure. A simple, butpowerful means to overcome this hurdle is through the administration ofcomplex reaction time tests implementable in real-time, into hand-helddevices and triggered by changes in extra-cerebral signals such as EKG;in a cooperative, motivated patient, cardiac activity changes in thecontext of an abnormal response or failed test will be classified asclinical seizures, while those with a preserved response as eithersubclinical seizures or false positive detections.

Based on the existing evidence and body or work, it may be stated thatextra-cerebral automated detection, warning, logging of seizures anddelivery of therapy, looms as a useful, cost-effective and widelyaccessible option to better manage pharmaco-resistant epilepsies.

An embodiment of a medical device adaptable for use in implementing someaspects of embodiments of the present invention is provided in FIG. 1 .As shown in FIG. 1 , a system may involve a medical device system thatsenses body signals of the patient-such as brain or cardiac activity—andanalyzes those signals to identify one or more aspects of the signalthat may identify the occurrence of a seizure. The signal may beprocessed to extract (e.g., mathematically by an algorithm that computescertain values from the raw or partially processed signal) features thatmay be used to identify a seizure when compared to the inter-ictalstate. As shown in the right side of FIG. 1 , the features may also begraphically displayed either in real time or subsequent to the event toenable visual confirmation of the seizure event and gain additionalinsight into the seizure (e.g., by identifying a seizure metricassociated with the seizure).

Turning now to FIG. 2 , a block diagram depiction of a medical device200 is provided, in accordance with one illustrative embodiment of thepresent invention. In some embodiments, the medical device 200 may beimplantable, while in other embodiments the medical device 200 may becompletely external to the body of the patient.

The medical device 200 may comprise a controller 210 capable ofcontrolling various aspects of the operation of the medical device 200.The controller 210 is capable of receiving internal data or externaldata, and in one embodiment, is capable of causing a therapy unit (notshown) to generate and deliver a therapy, such as an electrical signal,a drug, a cooling therapy, or two or more thereof, to one or more targettissues of the patient's body for treating a medical condition.Controller 210 may receive manual instructions from an operatorexternally, and may cause a therapy to be generated and delivered basedon internal calculations and programming. In other embodiments, themedical device 200 does not comprise a therapy unit. In eitherembodiment, the controller 210 is capable of affecting substantially allfunctions of the medical device 200.

The controller 210 may comprise various components, such as a processor215, a memory 217, etc. The processor 215 may comprise one or moremicrocontrollers, microprocessors, etc., capable of performing variousexecutions of software components. The memory 217 may comprise variousmemory portions where a number of types of data (e.g., internal data,external data instructions, software codes, status data, diagnosticdata, etc.) may be stored. The memory 217 may comprise one or more ofrandom access memory (RAM), dynamic random access memory (DRAM),electrically erasable programmable read-only memory (EEPROM), flashmemory, etc.

The medical device 200 may also comprise a power supply 230 which maycomprise a battery, voltage regulators, capacitors, etc., to providepower for the operation of the medical device 200, including electronicoperations and therapy generation and delivery functions. The powersupply 230 may be rechargeableor non-rechargeable. Different kinds ofpower supplies may be suitable for use in particular embodiments of themedical device 200, such as a lithium/thionyl chloride cell or alithium/carbon monofluoride (LiCFx) cell if the medical device 200 isimplantable, or conventional watch or 9V batteries for external (i.e.,non-implantable) embodiments. Other battery types known in the art ofmedical devices may also be used.

The medical device 200 may also comprise a communication unit 260capable of facilitating communications between the medical device 200and various other devices. In particular, the communication unit 260 iscapable of providing transmission and reception of electronic signals toand from a monitoring unit 270, such as a handheld computer or PDA thatcan communicate with the medical device 200 wirelessly or by cable. Thecommunication unit 260 may include hardware, software, firmware, or anycombination thereof.

The medical device 200 may also comprise one or more sensor(s) 212coupled via sensor lead(s) 211 to the medical device 200. The sensor(s)212 are capable of receiving signals related to a body signal, such asthe patient's heart beat, blood pressure, and/or temperature, anddelivering the signals to the medical device 200. The sensor 212 mayalso be capable of detecting kinetic signal associated with a patient'smovement. The sensor 212, in one embodiment, may be an accelerometer.The sensor 212, in another embodiment, may be an inclinometer. Inanother embodiment, the sensor 212 may be an actigraph. In oneembodiment, the sensor(s) 212 may be electrode(s) capable of alsoproviding an electrical stimulation therapy. In other embodiments, thesensor(s) 212 are external structures that may be placed on thepatient's skin, such as over the patient's heart or elsewhere on thepatient's torso, for detecting heart rate, blood pressure, blood oxygensaturation, skin resistivity, skin temperature, and other externallydetectable body signals. The sensor 212, in one embodiment is amultimodal signal sensor capable of detecting various autonomic andneurologic signals, including kinetic signals associated with thepatient's movement.

The seizure onset/termination unit 280 is capable of detecting anepileptic event based upon one or more signals provided by body datacollection module 275. The seizure onset/termination unit 280 canimplement one or more algorithms (e.g., a PMSA algorithm, anautoregression algorithm, a WTMM algorithm, or a STA/LTA algorithm)using the autonomic data and neurologic data in any particular order,weighting, etc. The seizure onset/termination unit 280 may comprisesoftware module(s) that are capable of performing various interfacefunctions, filtering functions, etc. In another embodiment, the seizureonset/termination unit 280 may comprise hardware circuitry that iscapable of performing these functions. In yet another embodiment, theseizure onset/termination unit 280 may comprise hardware, firmware,software and/or any combination thereof.

In addition to components of the medical device 200 described above, amedical device system may comprise a storage unit to store an indicationof a seizure detection by seizure onset/termination unit 280. Thestorage unit may be the memory 217 of the medical device 200, anotherstorage unit of the medical device 200, or an external database, such asa local database unit 255 or a remote database unit 250. The medicaldevice 200 may communicate the indication via the communications unit260. Alternatively or in addition to an external database, the medicaldevice 200 may be adapted to communicate the indication to at least oneof a patient, a caregiver, or a healthcare provider.

In various embodiments, one or more of the units or modules describedabove may be located in a monitoring unit 270 or a remote device 292,with communications between that unit or module and a unit or modulelocated in the medical device 200 taking place via communication unit260. For example, in one embodiment, one or more of the body datacollection module 275 or the seizure onset/termination unit 280 may beexternal to the medical device 200, e.g., in a monitoring unit 270.Locating one or more of the body data collection module 275 or theseizure onset/termination unit 280 outside the medical device 200 may beadvantageous if the calculation(s) is/are computationally intensive, inorder to reduce energy expenditure and heat generation in the medicaldevice 200 or to expedite calculation.

The monitoring unit 270 may be a device that is capable of transmittingand receiving data to and from the medical device 200. In oneembodiment, the monitoring unit 270 is a computer system capable ofexecuting a data-acquisition program. The monitoring unit 270 may becontrolled by a healthcare provider, such as a physician, at a basestation in, for example, a doctor's office. In alternative embodiments,the monitoring unit 270 may be controlled by a patient in a systemproviding less interactive communication with the medical device 200than another monitoring unit 270 controlled by a healthcare provider.Whether controlled by the patient or by a healthcare provider, themonitoring unit 270 may be a computer, preferably a handheld computer orPDA, but may alternatively comprise any other device that is capable ofelectronic communications and programming, e.g., hand-held computersystem, a PC computer system, a laptop computer system, a server, apersonal digital assistant (PDA), an Apple-based computer system, acellular telephone, etc. The monitoring unit 270 may download variousparameters and program software into the medical device 200 forprogramming the operation of the medical device, and may also receiveand upload various status conditions and other data from the medicaldevice 200. Communications between the monitoring unit 270 and thecommunication unit 260 in the medical device 200 may occur via awireless or other type of communication, represented generally by line277 in FIG. 2 . This may occur using, e.g., a wand to communicate byinductive or RF energy with medical device 200. Alternatively, the wandmay be omitted in some systems, e.g., systems in which the MD 200 isnon-implantable, or implantable systems in which monitoring unit 270 andMD 200 operate in the MICS bandwidths.

In one embodiment, the monitoring unit 270 may comprise a local databaseunit 255. Optionally or alternatively, the monitoring unit 270 may alsobe coupled to a database unit 250, which may be separate from monitoringunit 270 (e.g., a centralized database wirelessly linked to a handheldmonitoring unit 270). The database unit 250 and/or the local databaseunit 255 are capable of storing various patient data. These data maycomprise patient parameter data acquired from a patient's body, therapyparameter data, seizure severity data, and/or therapeutic efficacy data.The database unit 250 and/or the local database unit 255 may comprisedata for a plurality of patients, and may be organized and stored in avariety of manners, such as in date format, severity of disease format,etc. The database unit 250 and/or the local database unit 255 may berelational databases in one embodiment. A physician may perform variouspatient management functions (e.g., programming parameters for aresponsive therapy and/or setting references for one or more detectionparameters) using the monitoring unit 270, which may include obtainingand/or analyzing data from the medical device 200 and/or data from thedatabase unit 250 and/or the local database unit 255. The database unit250 and/or the local database unit 255 may store various patient data.

One or more of the blocks illustrated in the block diagram of themedical device 200 in FIG. 2 may comprise hardware units, softwareunits, firmware units, or any combination thereof. Additionally, one ormore blocks illustrated in FIG. 2 may be combined with other blocks,which may represent circuit hardware units, software algorithms, etc.Additionally, any number of the circuitry or software units associatedwith the various blocks illustrated in FIG. 2 may be combined into aprogrammable device, such as a field programmable gate array, an ASICdevice, etc.

Turning now to FIG. 3 , a block diagram depiction of an exemplaryimplementation of the body data collection module 275 is shown. The bodydata collection module 275 may include hardware (e.g., amplifiers,accelerometers), tools for chemical assays, optical measuring tools, abody data memory 350 (which may be independent of memory 117 or part ofit) for storing and/or buffering data. The body data memory 350 may beadapted to store body data for logging or reporting and/or for futurebody data processing and/or statistical analyses. Body data collectionmodule 275 may also include one or more body data interfaces 310 forinput/output (I/O) communications between the body data collectionmodule 275 and sensors 112. Body data from memory 350 and/or interface310 may be provided to one or more body index calculation unit(s) 355,which may determine one or more body indices.

In the embodiments of FIG. 3 , sensors 112 may be provided as any ofvarious body data units/modules (e.g., autonomic data acquisition unit360, neurological data acquisition unit 370, endocrine data acquisitionunit 373, metabolic data acquisition unit 374, tissue stress marker dataacquisition unit 375, and physical fitness/integrity determination unit376) via connection 380. Connection 380 may be a wired connection (e.g.,a lead) a wireless connection, or a combination of the two. Connection380 may be a bus-like implementation or may include an individualconnection (not shown) for all or some of the body data units.

In one embodiment, the autonomic data acquisition unit 360 may include acardiac data acquisition unit 361 adapted to acquire a phonocardiogram(PKG), EKG, echocardiography, apexcardiography and/or the like, a bloodpressure acquisition unit 363, a respiration acquisition unit 364, ablood gases acquisition unit 365, and/or the like. In one embodiment,the neurologic data acquisition unit 370 may contain a kinetic unit 366that may comprise an accelerometer unit 367, an inclinometer unit 368,and/or the like; the neurologic data acquisition unit 370 may alsocontain a responsiveness/awareness unit 369 that may be used todetermine a patient's responsiveness to testing/stimuli and/or apatient's awareness of their surroundings. Body data collection module275 may collect additional data not listed herein, that would becomeapparent to one of skill in the art having the benefit of thisdisclosure.

The body data units ([360-370], [373-377]) may be adapted to collect,acquire, receive/transmit heart beat data, EKG, PKG, echocardiogram,apexcardiogram, blood pressure, respirations, blood gases, bodyacceleration data, body inclination data, EEG/ECoG, quality of lifedata, physical fitness data, and/or the like.

The body data interface(s) 310 may include various amplifier(s) 320, oneor more A/D converters 330 and/or one or more buffers 340 or othermemory (not shown). In one embodiment, the amplifier(s) 320 may beadapted to boost and condition incoming and/or outgoing signal strengthsfor signals such as those to/from any of the body data acquisitionunits/modules (e.g., ([360-370], [373-377])) or signals to/from otherunits/modules of the MD 100. The A/D converter(s) 330 may be adapted toconvert analog input signals from the body data unit(s)/module(s) into adigital signal format for processing by controller 210 (and/or processor215). A converted signal may also be stored in a buffer(s) 340, a bodydata memory 350, or some other memory internal to the MD 100 (e.g.,memory 117, FIG. 1 ) or external to the MD 100 (e.g., monitoring unit170, local database unit 155, database unit 150, and remote device 192).The buffer(s) 340 may be adapted to buffer and/or store signals receivedor transmitted by the body data collection module 275.

As an illustrative example, in one embodiment, data related to apatient's respiration may be acquired by respiration unit 364 and sentto MD 100. The body data collection module 275 may receive therespiration data using body data interface(s) 310. As the data isreceived by the body data interface(s) 310, it may beamplified/conditioned by amplifier(s) 320 and then converted by A/Dconverter(s) into a digital form. The digital signal may be buffered bya buffer(s) 340 before the data signal is transmitted to othercomponents of the body data collection module 275 (e.g., body datamemory 350) or other components of the MD 100 (e.g., controller 110,processor 115, memory 117, communication unit 160, or the like). Bodydata in analog form may be also used in one or more embodiments.

Body data collection module 275 may use body data from memory 350 and/orinterface 310 to calculate one or more body indices in body one or morebody index calculation unit(s) 355. A wide variety of body indices maybe determined, including a variety of autonomic indices such as heartrate, blood pressure, respiration rate, blood oxygen saturation,neurological indices such as maximum acceleration, patient position(e.g., standing or sitting), and other indices derived from body dataacquisition units 360, 370, 373, 374, 375, 376, 377, etc.

Turning now to FIG. 4 , an MD 100 (as described in FIG. 3 ) is provided,in accordance with one illustrative embodiment of the present invention.FIG. 4 depicts the body data acquisition units similar to those shown inFIG. 3 , in accordance with another embodiment, wherein these unites areincluded within the MD 100, rather being externally coupled to the MD100, as shown in FIG. 3 . In accordance with various embodiments, anynumber and type of body data acquisition units may be included withinthe MD 100, as shown in FIG. 4 , while other body data units may beexternally coupled, as shown in FIG. 3 . The body data acquisition unitsmay be coupled to the body data collection module 275 in a fashionsimilar to that described above with respect to FIG. 3 , or in anynumber of different manners used in coupling intra-medical devicemodules and units. The manner by which the body data acquisition unitsmay be coupled to the body data collection module 275 is not essentialto, and does not limit, embodiments of the instant invention as would beunderstood by one of skill in the art having the benefit of thisdisclosure. Embodiments of the MD depicted in FIG. 4 may be fullyimplantable or may be adapted to be provided in a system that isexternal to the patient's body.

A time series body signal collected by the body data collection module275 may comprise at least one of a measurement of the patient's heartrate, a measurement of the patient's kinetic activity, a measurement ofthe patient's brain electrical activity, a measurement of the patient'soxygen consumption, a measurement of the patient's work, a measurementof an endocrine activity of the patient, a measurement of a metabolicactivity of the patient, a measurement of an autonomic activity of thepatient, a measurement of a cognitive activity of the patient, or ameasurement of a tissue stress marker of the patient.

Turning to FIG. 5 , the seizure onset/termination unit 280 depicted inFIG. 2 is shown in greater detail. The seizure onset/termination unit280 may comprise a body signal interface 510 adapted to receivedcollected body data from the body data collection module 275 and detecta seizure by identification of an onset time and a seizure terminationtime. For example, the seizure onset/termination unit 280 may be adaptedto receive a time series of collected body data.

The seizure onset/termination unit 280 may also comprise a time windowcontrol module 520. The time window control module 520 may comprise afirst window determination module 521, adapted to determine a slidingtime window for the time series body signal comprising a first window;and/or a second window determination module 522, adapted to determine asliding time window for the time series body signal comprising a secondwindow.

In other embodiments (not shown), any time window used herein may be amoving time window, not necessarily a sliding time window. As usedherein, a “sliding” time window moves over continuous points of a timeseries and the present (e.g., foreground) and past (e.g., background)are contiguous in time, if not overlapping. For example, if theforeground window is 5 s and the background 60 s in length, and thecurrent time is 10:00:00 AM, the temporal location of the foregroundwindow may be 10:00:00-10:00:05 and that of the background,09:59:00-10:00:00. A “moving” time window may move over continuouspoints of the time series or “jump” over discontinuous points. Forexample, a moving window may be chosen from past data that optimizessensitivity, specificity, or speed of detection as required by thepatient's prevailing conditions, activities, or time of day, said timebeing discontiguous from that of the foreground window. Using theexample cited immediately above, in this example, the foreground windowof 5 s at 10:00:00 AM may be compared to a 60 s background recorded 6hr. earlier (04:00:00-04:01:00). A moving window may also be the averageor median of several windows.

The seizure onset/termination unit 280 may also comprise anautoregression application module 530. The autoregression applicationmodule 530 may be adapted to apply an autoregression algorithm to eachof the first and second time windows, to yield an autoregressioncoefficient for each window and a residual variance for each window.

The autogression model may be of second order, and have parameterscomprising a second time window length of 1 second; a first time windowlength of 1 second; and a detection threshold (R) of 3.

The parameters of the autogression model may be selected based on atleast one of a clinical application of said detection; a level of safetyrisk associated with an activity; at least one of an age, physicalstate, or mental state of the patient; a length of a window availablefor warning; a degree of efficacy of therapy and of its latency; adegree of seizure control; a degree of circadian and ultradianfluctuations of said patient's seizure activity; a performance of thedetection method as a function of the patient's sleep/wake cycle orvigilance level; a dependence of the patient's seizure activity on atleast one of a level of consciousness, a level of cognitive activity, ora level of physical activity; the site of seizure origin; a seizure typesuffered by said patient; a desired sensitivity of detection of aseizure, a desired specificity of detection of a seizure, a desiredspeed of detection of a seizure, an input provided by the patient, or aninput provided by a sensor.

In various embodiments, the selected parameters may reflect the degreeof certainty of detections desired by the patient, a caregiver, amedical professional, or two or more thereof. Such person(s) areexpected to have biases regarding their desire for certainty ofdetection, and variation in their risk-proneness and/or aversion torisk. Thus, in one embodiment, the patient, caregiver, and/or medicalprofessional may be allowed to change (within certain limits and forcertain activities only, if desired) the sensitivity, specificity,and/or speed of detection of the algorithms.

The seizure onset/termination unit 280 may also comprise a parametervector estimation module 540. The parameter vector estimation module 540may be adapted to estimate a parameter vector for each of the first andsecond windows, based at least in part on the autoregressioncoefficients and the residual variances determined by the autoregressionapplication module 530.

The seizure onset/termination unit 280 may also comprise a parametervector difference determination module 550. The parameter vectordifference determination module 550 may be adapted to determine adifference of the parameter vectors for each of the first and secondwindows. For example, the parameter vector difference determinationmodule 550 may implement a matrix function to determine the difference.

The seizure onset/termination unit 280 may also comprise a seizure onsetdetermination module 560. The seizure onset determination module 560 maybe configured to determine an onset of a seizure based on the differencebetween the parameter vectors. For example, the seizure onsetdetermination module 560 may determine a seizure onset if the differenceindicates a larger variance in the first window than in the secondwindow.

The seizure onset/termination unit 280 may also comprise a seizuretermination determination module 570. The seizure terminationdetermination module 570 may be adapted to determine a termination of aseizure based on the difference between the parameter vectors. Forexample, the seizure termination determination module 570 may determinea seizure termination if the difference indicates a larger variance inthe second window than in the first window.

Turning to FIG. 10 , a flowchart depiction of a method for detecting anonset and a termination of an epileptic event from a patient body signalis shown. A time series of a first body signal of a patient may bereceived at 1010. Sliding first and second time windows for the timeseries body signal may be determined at 1020. An autoregressionalgorithm may then be applied, such as by applying an autoregressionanalysis at 1030 to each of the first and second windows to yield aplurality of autoregression coefficients and a residual variance foreach window. A parameter vector may then be estimated at 1040 for eachof the first and second windows, based at least in part on theautoregression coefficients and the residual variances. A differencebetween the parameter vectors may be determined at 1045. For example,the difference may be determined at 1045 by use of a matrix function. Anonset of a seizure may be determined at 1050 based on the differencebetween the parameter vectors, for example, if the difference indicatesa larger variance in the second window than in the first window. Atermination of a seizure may be determined at 1060 based on thedifference between the parameter vectors, for example if the differenceindicates a larger variance in the first window than in the secondwindow.

Optionally, the method depicted in FIG. 10 may comprise otheractivities. The method may further involve delivering a therapy for theseizure at a particular time at 1070, wherein at least one of thetherapy, the particular time, or both is based upon the determination ofthe seizure onset.

Alternatively or in addition, the method may further involve determiningat 1080 an efficacy of the therapy.

Alternatively or in addition, the method may further involve issuing at1085 a warning for the seizure, wherein the warning is based upon thedetermination of the seizure onset.

Alternatively or in addition, at least one of the delivered therapy orthe issued warning may be based at least in part on at least one of thetype of activity engaged in by the patient at the time of seizure onset,the seizure type, the seizure severity, or the time elapsed from thelast seizure.

Alternatively or in addition, the method may further involve determiningat 1090 at least one of a timing of delivery of therapy, a type oftherapy, at least one parameter of the therapy, a timing of sending awarning, a type of warning, a duration of the warning, or an efficacy ofsaid therapy, based upon a timing of said determination of said seizureonset, said determination of said seizure termination, or both.

Alternatively or in addition, the method may further involve determiningat 1095 at least one value selected from the duration of the epilepticevent, the severity of the epileptic event, the intensity of theepileptic event, the extent of spread of the epileptic event, aninter-seizure interval between the epileptic event and a prior epilepticevent, a patient impact of the epileptic event, or a time of occurrenceof the epileptic event. The method may further comprise logging at 1096at least one data point associated with the seizure, such as a time ofoccurrence of the seizure, a seizure duration, a seizure severity, atype of therapy and/or time of delivery thereof, etc.

A method, such as that depicted in FIG. 10 , may be implemented by anon-transitory computer readable program storage unit encoded withinstructions that, when executed by a computer, perform the method.

An activity, such as walking, swimming, driving, etc., may be allowed orterminated, a warning may be issued or not issued, or a therapy may bedelivered or not delivered, based on the determination of seizure onset,seizure termination, or both, either for the autoregression algorithmalone or a PMSA value calculated at least in part from an indicatorfunction derived from the autoregression algorithm.

An “efficacy index” may be used herein to refer to any quantification ofan efficacious result of a therapy. In one example, if a patient'sseizures typically present an increase in heart rate from a resting rateof 80 beats per minute (BPM) to a peak ictal heart rate of 160 BPM, andupon administering a therapy to the patient, the patient's peak ictalheart rate is 110 BPM, this result may be quantified as an efficacyindex of 50 (on a scale of non-therapy peak ictal heart rate—peak ictalheart rate after therapy), 0.625 (50 BPM reduction from peak ictal heartrate/80 BPM increase from resting rate to peak ictal heart rate in theabsence of therapy), etc.

1. A non-transitory computer readable program storage unit encoded withinstructions that, when executed by one or more medical devices,performs a method, comprising: receiving via the one or more medicaldevices a time series of a first body signal of a patient obtained fromone or more sensors; determining a sliding foreground time window and asliding background time window for the time series of the first bodysignal; applying a spectral filter having a defined power spectraldensity to each of the sliding foreground time window and the slidingbackground time window; determining a ratio of a spectral power betweenthe sliding foreground time window and the sliding background timewindow; determining a seizure onset in response to a first determinationthat the ratio reaches an onset threshold; initiating an electricaltherapy based on the seizure onset determination; determining a seizuretermination in response to a second determination that the ratio reachesa termination threshold; and wherein the method further comprises atleast one of: determining a seizure occurrence based on a first outputof a STA/LTA algorithm on at least one second body signal; determiningthe seizure occurrence based on a second output of at least one secondalgorithm on the first body signal; and determining the seizureoccurrence based on a third output of at least one second algorithm onthe at least lease one second body signal; wherein the second bodysignal is selected from an EKG signal, an accelerometer signal, or asignal indicative of a loss of responsiveness.
 2. The non-transitorycomputer readable program storage unit of claim 1, including data thatwhen executed by the one or more medical devices perform the method ofclaim 1, wherein: a number of samples in the sliding foreground timewindow (N_(STA)) is 16; a number of samples in the sliding backgroundtime window (N_(LTA)) is 360; the time of seizure onset (T_(onset))corresponds to a time fulfilling a conditionSTALTA(τ+N_(STA)/2)≥T_(onset), wherein${{STALTA}(\tau)} = \frac{\sum\limits_{t = {\tau - N_{STA} + 1}}^{\tau}{{X^{2}(t)}/N_{STA}}}{\sum\limits_{t = {\tau - N_{LTA} + 1}}^{\tau}{{X^{2}(t)}/N_{LTA}}}$ and τ is a common right-hand end of both the sliding foreground timewindow and the sliding background time window; a time of the seizuretermination (T_(end)) corresponds to a second time fulfilling a secondcondition of max {STALTA(s), τ−N_(STA)≤ s≤ τ }≤ T_(end); and a filter'sspectral density corresponds to a Daubechies wavelet order 4, level 3.3. The non-transitory computer readable program storage unit of claim 1,including data that when executed by the one or more medical devicesperform the method of claim 1, wherein at least one parameter selectedfrom the sliding foreground time window, the sliding background timewindow, the spectral filter, the onset threshold, or the terminationthreshold is selected based on at least one of: a level of safety riskassociated with an activity; at least one of an age, a physical state,or a mental state of the patient; a length of a window available for awarning; a degree of circadian and ultradian fluctuations of a patient'sseizure activity; a performance of a detection method as a function of apatient's sleep/wake cycle or vigilance level; a dependence of apatient's seizure activity on at least one of a level of consciousness,a level of cognitive activity, or a level of physical activity; a siteof a seizure origin; or a seizure type.
 4. The non-transitory computerreadable program storage unit of claim 3, including data that whenexecuted by the one or more medical devices perform the method of claim3, wherein the method further comprises adaptively establishing the atleast one parameter.
 5. The non-transitory computer readable programstorage unit of claim 1, including data that when executed by one ormore medical devices perform the method of claim 1, wherein the secondbody signal comprises at least one of: a measurement of a patient'sheart activity, a measurement of a patient's respiratory activity, ameasurement of a patient's kinetic activity, a measurement of apatient's brain electrical activity, a measurement of a patient's oxygenconsumption, a measurement of a patient's oxygen saturation, ameasurement of an endocrine activity of the patient, a measurement of ametabolic activity of the patient, a measurement of an autonomicactivity of the patient, a measurement of a cognitive activity of thepatient, and a measurement of a tissue stress marker of the patient. 6.The non-transitory computer readable program storage unit of claim 1,including data that when executed by the one or more medical devicesperform the method of claim 1, wherein the method further comprises:initiating the electrical therapy by delivering the electrical therapyfor the seizure at a particular time, wherein at least one of theelectrical therapy, the particular time, or both is based upon thedetermination of the seizure onset; determining an efficacy of theelectrical therapy; or issuing a warning for the seizure, wherein thewarning is based upon the determination of the seizure onset.
 7. Thenon-transitory computer readable program storage unit of claim 1,including data that when executed by the one or more medical devicesperform the method of claim 1, wherein the method further comprisesdetermining at least one of: a timing of a delivery of the electricaltherapy, a type of the electrical therapy, at least one parameter of theelectrical therapy, a timing of sending a warning, a type of thewarning, a duration of the warning, or an efficacy index based upon theseizure onset, the seizure termination, or both.
 8. The non-transitorycomputer readable program storage unit of claim 1, including data thatwhen executed by the one or more medical devices perform the method ofclaim 1, wherein the method further comprises: determining at least onevalue selected from a duration of the seizure, a severity of theseizure, an intensity of the seizure, an extent of spread of theseizure, an inter-seizure interval between the seizure and a priorseizure, a patient impact of the seizure, and a time of the seizureoccurrence; and logging the at least one value in a memory.
 9. Thenon-transitory computer readable program storage unit of claim 1,including data that when executed by one or more medical devices performthe method of claim 1, wherein the method further comprises estimating adegree of nonstationarity of the first body signal.
 10. A medical devicefor detecting a seizure onset and a seizure termination of an epilepticseizure event from a patient body signal using a multi time-periodaveraging algorithm, comprising: a body data processing module forreceiving via one or more processors a body signal of a patient during afirst time series from one or more sensors; and a seizureonset/termination unit configured to: select a first time window and asecond time window within the first time series; apply a spectral filterhaving a predetermined power spectral density to each of the first timewindow and the second time window; determine a ratio of a spectral powerbetween the first time window and the second time window; determine thatthe seizure onset has occurred in response to a first determination thatthe ratio reaches an onset threshold; initiating an electrical therapybased on the seizure onset determination; and determine that the seizuretermination has occurred in response to a second determination that theratio reaches a termination threshold; wherein the time window controlmodule uses parameters selected based on at least one of: a clinicalapplication of at least one the determination; a level of safety riskassociated with an activity; at least one of an age, a physical state,or a mental state of the patient; a length of a window available for awarning; a degree of efficacy of the electrical therapy and of theelectrical therapy's latency; a degree of a seizure control; a degree ofcircadian and ultradian fluctuations of a patient's seizure activity; aperformance of the detection method as a function of a patient'ssleep/wake cycle or vigilance level; a dependence of the patient'sseizure activity on at least one of a level of consciousness, a level ofcognitive activity, or a level of physical activity; a site of seizureorigin; a seizure type, a desired sensitivity of the detection of theseizure, a desired specificity of the detection of the seizure, adesired speed of the detection of the seizure, an input provided by thepatient, or an input provided by the one or more sensors.
 11. Themedical device of claim 10, wherein the body data processing modulecomprises: a body data interface for receiving the body signal, the bodydata interface comprising: a buffer to perform buffering function uponthe body signal; an amplifier for performing an amplification of thebody signal; an analog-to-digital (A/D) converter for converting thebody signal from an analog signal to a digital signal; and a filter forperforming a filtering function upon the body signal; and a body datamemory to store the digital signal.
 12. The medical device of claim 10,wherein the seizure onset/termination unit comprises: a time windowcontrol module capable of selecting the first time window and the secondtime window; a spectral filter module for applying the spectral filterto the first time window and the second time window; a ratiodetermination unit for determining the ratio of the spectral power; anda ratio threshold comparison unit for comparing the ratio of thespectral power to a first threshold to determine whether the seizureonset has occurred, and for comparing the ratio of the spectral power toa second threshold to determine whether the seizure termination hasoccurred.
 13. The medical device of claim 10, wherein the first timeseries body signal comprises at least one of a measurement of apatient's heart activity, a measurement of a patient's respiratoryactivity, a measurement of a patient's kinetic activity, a measurementof a patient's brain electrical activity, a measurement of a patient'soxygen consumption, a measurement of a patient's oxygen saturation, ameasurement of an endocrine activity of the patient, a measurement of ametabolic activity of the patient, a measurement of an autonomicactivity of the patient, a measurement of a cognitive activity of thepatient, or a measurement of a tissue stress marker of the patient. 14.A non-transitory computer readable program storage unit encoded withinstructions that, when executed by one or more medical devices,performs a method, comprising: receiving via the one or more medicaldevices a time series of a first body signal of a patient obtained fromone or more sensors; determining a sliding foreground time window and asliding background time window for the time series of the first bodysignal; applying a spectral filter to each of the sliding foregroundtime window and the sliding background time window; determining a ratioof a spectral power between the sliding foreground time window and thesliding background time window; determining a seizure onset in responseto a first determination that the ratio reaches an onset threshold;initiating an electrical therapy based on the seizure onsetdetermination; wherein the method further comprises at least one of:determining a seizure occurrence based on a first output of a STA/LTAalgorithm on at least one second body signal; determining the seizureoccurrence based on a second output of at least one second algorithm onthe first body signal; and determining the seizure occurrence based on athird output of at least one second algorithm on the at least lease onesecond body signal; wherein the second body signal is selected from anEKG signal, an accelerometer signal, or a signal indicative of a loss ofresponsiveness.
 15. The non-transitory computer readable program storageunit of claim 14, including data that when executed by the one or moremedical devices perform the method of claim 1, wherein: a number ofsamples in the sliding foreground time window (N_(STA)) is 16; a numberof samples in the sliding background time window (N_(LTA)) is 360; thetime of seizure onset (T_(onset)) corresponds to a time fulfilling acondition STALTA(τ+N_(STA)/2)≥T_(onset), wherein${{STALTA}(\tau)} = \frac{\sum\limits_{t = {\tau - N_{STA} + 1}}^{\tau}{{X^{2}(t)}/N_{STA}}}{\sum\limits_{t = {\tau - N_{LTA} + 1}}^{\tau}{{X^{2}(t)}/N_{LTA}}}$ and τ is a common right-hand end of both the sliding foreground timewindow and the sliding background time window; and a filter's spectraldensity corresponds to a Daubechies wavelet order 4, level
 3. 16. Thenon-transitory computer readable program storage unit of claim 14,including data that when executed by the one or more medical devicesperform the method of claim 14, wherein at least one parameter selectedfrom the sliding foreground time window, the sliding background timewindow, the spectral filter, the onset threshold, or the terminationthreshold is selected based on at least one of: a level of safety riskassociated with an activity; at least one of an age, a physical state,or a mental state of the patient; a length of a window available for awarning; a degree of circadian and ultradian fluctuations of a patient'sseizure activity; a performance of a detection method as a function of apatient's sleep/wake cycle or vigilance level; a dependence of apatient's seizure activity on at least one of a level of consciousness,a level of cognitive activity, or a level of physical activity; a siteof a seizure origin; or a seizure type.
 17. The non-transitory computerreadable program storage unit of claim 16, including data that whenexecuted by the one or more medical devices perform the method of claim16, wherein the method further comprises adaptively establishing the atleast one parameter.
 18. The non-transitory computer readable programstorage unit of claim 14, including data that when executed by one ormore medical devices perform the method of claim 14, wherein the secondbody signal comprises at least one of: a measurement of a patient'sheart activity, a measurement of a patient's respiratory activity, ameasurement of a patient's kinetic activity, a measurement of apatient's brain electrical activity, a measurement of a patient's oxygenconsumption, a measurement of a patient's oxygen saturation, ameasurement of an endocrine activity of the patient, a measurement of ametabolic activity of the patient, a measurement of an autonomicactivity of the patient, a measurement of a cognitive activity of thepatient, and a measurement of a tissue stress marker of the patient. 19.The non-transitory computer readable program storage unit of claim 14,including data that when executed by the one or more medical devicesperform the method of claim 14, wherein the method further comprises:initiating the electrical therapy by delivering the electrical therapyfor the seizure at a particular time, wherein at least one of theelectrical therapy, the particular time, or both is based upon thedetermination of the seizure onset; determining an efficacy of theelectrical therapy; or issuing a warning for the seizure, wherein thewarning is based upon the determination of the seizure onset.